package com.xjggb.day03单例;

public class Demo03 {

    public static void main(String[] args) {

        MusicPlayer instance1 = MusicPlayer.getInstance();
        MusicPlayer instance2 = MusicPlayer.getInstance();
        MusicPlayer instance3 = MusicPlayer.getInstance();
        System.out.println("instance1 = " + instance1);
        System.out.println("instance2 = " + instance2);
        System.out.println("instance1 = " + instance1);

        System.out.println(" = ==============================" );
//        懒汉式
        VideoPlayer instance4 = VideoPlayer.getInstance();
        VideoPlayer instance5 = VideoPlayer.getInstance();
        System.out.println("instance4 = " + instance4);
        System.out.println("instance4 = " + instance5);


    }
}
